<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <h1>JS 对象</h1>
    <hr>

    <script>
        function User(){
            this.name = '莉莉';
            this.age = 88;
            this.getInfo = function () {
                document.write('Hi~ o(*￣▽￣*)ブ <br>');
            }
        }

        var obj = new User();

        delete obj.name;
        delete obj.age;
        delete obj.getInfo;

        console.log(obj);
        obj.getInfo();

    </script>
</body>
</html>